package com.luoc.spring;

import com.luoc.spring.service.OrderService;
import com.luoc.spring.service.ProductService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class SpringDemo {
    public static void main(String[] args) {
        //创建spring容器
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig.class);
        //开启产品服务
        OrderService bean = context.getBean(OrderService.class);
        Object product = bean.getOrder(1002L);
        System.out.println(product);
    }


}